import App from './App'
import './iconfont.css'
import uviewPlus from 'uview-plus'


// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif


// #ifdef VUE3
import {createPinia} from 'pinia';
import BaseCoverImage from '@/components/BaseCoverImage.vue'
import NavBarVue from '@/components/NavBar.vue'
import TabBarVue from '@/components/TabBar.vue'
import UploadFileVue from '@/components/UploadFile.vue'
import {
    createSSRApp
} from 'vue'

const pinia = createPinia()

export function createApp() {
    const app = createSSRApp(App)
    app.use(uviewPlus)
    app.use(pinia);
    app.component("BaseCoverImage", BaseCoverImage);
    app.component('NavBarVue', NavBarVue)
    app.component('TabBarVue', TabBarVue)
    app.component('UploadFileVue', UploadFileVue)
    return {
        app
    }
}

// #endif